slideShowFromFolder Plugin class
This class reads an folder and creates a gallery out of the pictures in it.
Also looks if a "texts.txt" or "captions.txt" exists, to get image captions. The captions in this file must have the following format: filename.jpg###Text which sould apear under the image, when zoomed in otherFilname.png###Another text which describes the picture ...
Note: works only with "png", "gif" and "jpg" or "jpeg" filetypes. Note: The image gallery is surrounded by an '<div class="feinduraPlugin_slideShowFromFolder">' tag to help to style the image gallery.
int | $documentRoot | You can set the document root manually. |
bool | $xHtml | TRUE when the pages content should be handled as XHTML |
int | $resizeWhenSmaller | TRUE when images shopuld also be resized, even if they are smaller, than the set width, or height values. |
int | $keepRatio | If TRUE the original ratio will be used, when resizing the images. |
int | $width | The slideshow container width. |
int | $height | The slideshow container height. |
int | $imageWidth | The maximal width of the pictures |
int | $imageHeight | The maximal height of the pictures |
array | $images | An array which contains all image filenames and paths |
string | $path | The absolute path to the gallery |
string | $title | The title of the gallery, retrieved from the "title.txt" |
int | $lastModification | the timestamp of the latest modification of the files |
void | __construct() | The constructor of the class, sets all basic properties. Also looks if a "texts.txt" or... |
array|false | readFolder() | Reads a folder and return it's files. |
bool | resizeImages() | Resize the images to the size set in the slideShowFromFolder::$imageWidth and slideShowFromFolder::$imageHeight... |
array | getImages() | Generates the image links and return them in an array. |
string | show() | Generates the slide show for displaying in an HTML-page Note : The slide show div tag has also a... |
TRUE when the pages content should be handled as XHTML
In XHTML standalone tags end with " />" instead of ">".
Therefor when a page content is displayed and this property is FALSE all " />" will be changed to ">".
TRUE when images shopuld also be resized, even if they are smaller, than the set width, or height values.
If TRUE the original ratio will be used, when resizing the images.
If this property is FALSE and only width or height is set, it even though keeps the ratio.
The maximal width of the pictures
All pictures will be resized to this width when the slideShowFromFolder::resizeImages() method is called.
Note: If the slideShowFromFolder::$imageHeight property is null, it keeps the aspect ratio of the images.
The maximal height of the pictures
All pictures will be resized to this height when the resizeImages() method is called.
Note: If the slideShowFromFolder::$imageWidth property is null, it keeps the aspect ratio of the images.
The absolute path to the gallery
The title of the gallery, retrieved from the "title.txt"
string | $folder |
the absolut path of the folder from where a gallery should be created |
$documentRoot |
Default false |
Type constructor
The constructor of the class, sets all basic properties.
Also looks if a "texts.txt" or "captions.txt" exists, to get image captions. The captions in this file must have the following format: filename.jpg###Text which sould apear under the image, when zoomed in otherFilname.png###Another text which describes the picture ...
string | $folder |
the absolute path of an folder to read |
Name readFolder()
Reads a folder and return it's files.
Name resizeImages()
Resize the images to the size set in the slideShowFromFolder::$imageWidth and slideShowFromFolder::$imageHeight property.
Name getImages()
Generates the image links and return them in an array.
string | $containerId |
the ID if the container div, which holds the slideShowFromFolder |
array | $pageContent |
(optional) the $pageContent array of the page which uses the plugin, to compare the last edit date with the one from the "lastmodification.log" Default false |
Name show()
Generates the slide show for displaying in an HTML-page
Note: The slide show div tag has also a 'class="feinduraPlugin_slideShowFromFolder nivoo-slider"' attribute for styling.